from django.urls import path
from rest_framework.routers import DefaultRouter

from CarQueryApp.views import index, delet_record, handle_record, export_excel, get_bar_data, get_record, SearchViewSet

urlpatterns = [
    path('', index),
    path('getRecord/', get_record),
    path('delete/<int:rno>/', delet_record),
    path('handle/<int:rno>/', handle_record),
    path('export/', export_excel),
    path('data/', get_bar_data),

]

# 定义路由器
router = DefaultRouter()
# 注册
router.register('search', SearchViewSet)

# 添加
urlpatterns += router.urls
